﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;

namespace OrchardSystemServer.Security
{
    public class SecurityUtil
    {
        /// <summary>
        /// MD5加密，16位
        /// </summary>
        /// <param name="convertString">需要加密的字符串</param>
        /// <returns>加密后的字符串</returns>
        public static string Get16BitMd5(string convertString)
        {
            MD5CryptoServiceProvider md5Provider = new MD5CryptoServiceProvider();
            return BitConverter.ToString(md5Provider.ComputeHash(UTF8Encoding.Default.GetBytes(convertString))).Replace("-",""); ;
        }
    }
}
